package com.tz.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by CLL on 2016/10/9.
 */

@Component //当前类是组件
public class ClassA {

    @Autowired //依赖注入
    private ClassB b;

    @Autowired
    private InterfaceC c;//A依赖InterfaceC


    public void a() {
        System.out.println("小猪熊A出发。。。");
        b.b();
        c.c();
    }
}
